A binarization processing in image recognition is an important technology which exerts an influence on any accuracy of decoded output result. The following will describe typical image recognition.
In a patent document 1, a face authentication device has been disclosed which performs processing thereof while sorting in descending order of differential intensity. According to this face authentication device, a differential intensity image is produced from a gray-scale image, which is a face image, by differentiation, and processing for sorting pixels in the descending order of differential intensity is performed within a predefined area containing the extracted face parts in the produced differential intensity image. A threshold value is then set for a region selected only by a specified number of pixels, associated with the facial parts, as a region with intense concentration change and the rest region as a region with non-intense concentration change and the differential intensity image is output as a binarized image by use of the set thresholds.
In a patent document 2, a binarization system capable of performing binarization by differentiation has been disclosed. According to this binarization system, a code symbol, namely, a multi-level image signal is imaged by an image sensing device composed of CCD, CMOS or the like; to detect a zero crossing point by a zero crossing point detecting part, a second derivative is performed by a second derivative part; and a point (the zero crossing point) on which this second derivative signal is excessively changed from positive to negative or from negative to positive is detected by a sign changing point detection part. The next binarization threshold calculating part samples and holds a brightness value of the multi-level image signal output from a code reading part based on a trigger signal from the zero crossing point detecting part to output it to a binarization part as a binarization threshold value.
In a patent document 3, an optical character reader (OCR) capable of performing binarization by A/D conversion has been disclosed. In the OCR, an image processing is carried out by performing the A/D conversion on image data of an original imaged by CCD so that the original is as white background and the character is as black portion. For example, the dynamic range is extended by setting the difference of a maximum value (white side) and a minimum value (black side) in original read data as the reference voltage of A/D conversion and by performing the A/D conversion based on this reference voltage, accuracy of the binarization is enhanced.
In a patent document 4, optical disc play-back equipment capable of correctly performing a seek operation has been disclosed. In an optical pickup, the optical pickup is moved in the radial direction of the optical disc while an objective lens thereof is shifted respectively to the most inner peripheral position and the most outer peripheral position of its shift range. In this moment, a threshold value generating circuit obtains a first threshold value and a second threshold value being optimum for binarizing a signal before binarization in respective states, and sets an average value of the both threshold values to a threshold value register as the final threshold value. At the time of seek operation, the signal before binarization is binarized by the final threshold value. Thus, the first threshold value and the second threshold value are respectively obtained at the most inner peripheral position and the most outer peripheral position of the objective lens in its shift range in which the optimum value for binarizing is maximum or minimum and the average value of the both is set to a predetermined threshold value.
Next, the following will describe a process of the binarization processing in the image recognition in detail, taking as an example a code scanner which processes code symbol image optically.
This code scanner irradiates a laser beam or the like onto a code image 51 formed on an object 50 to be read as shown in FIG. 12, receives reflected light thereof and performs any electrical transactions thereon to read information contained in the code image 51.
For example, the code image 51 is composed of bars (For example, wide bars WB in which their widths are wide and narrow bars NB in which their widths are narrow) and spaces (For example, wide spaces WS in which their widths are wide and narrow spaces NS in which their widths are narrow). In addition, it is assumed that in this example, the object 50 to be read is spotted with a stain N.
Next, the following will describe an example of the binarization processing by such a code scanner. FIG. 13 is a diagram showing a waveform example of a read signal D1 in which a vertical axis indicates a signal level (intensity of the reflected light) and a horizontal axis indicates position. As shown in FIG. 13, the information contained in the code image 51 read by the code scanner is read as the read signal D1.
This read signal D1 contains a wide bar waveform WB1 which has a downward large convex shape, a narrow bar waveform NB1 which has a downward small convex shape, a wide space waveform WS1 which has an upward large convex shape and a narrow space waveform NS1 which has an upward small convex shape, which respectively correspond to the wide bar WB, the narrow bar NB, the wide space WS and the narrow space NS in the code image 51. Accordingly, when the object 50 to be read is spotted with the stain N as shown in FIG. 12, the read signal D1 contains any noise N1.
FIG. 14 is a diagram showing a waveform example of a derivative signal D2 in which a vertical axis indicates a signal level and a horizontal axis indicates position. The code scanner differentiates the read signal D1 to produce the derivative signal D2. As shown in FIG. 14, this derivative signal D2 has a waveform in which inflection points of the wide bar waveform WB1, the narrow bar waveform NB1, the wide space waveform WS1 and the narrow space waveform NS1 in the read signal D1 are their extreme values.
FIG. 15 is a diagram showing a waveform example of a binarization signal D3 in which a vertical axis indicates bar/space (the bar in a case of “0” and the space in a case of “1”) and a horizontal axis indicates position. The code scanner produces the binarization signal D3 by using the inflection points of the derivative signal D2 as standing points thereof or falling points thereof.
As shown in FIG. 15, this binarization signal D3 contains a wide bar signal WB3, a narrow bar signal NB3, a wide space signal WS3 and a narrow space signal NS3, which respectively correspond to the wide bar waveform WB1, the narrow bar waveform NB1, the wide space waveform WS1 and the narrow space waveform NS1. Further, the binarization signal D3 contains also a noise signal N3 which corresponds to the noise N1 in the read signal D1.
Thus, when the object 50 to be read is spotted with the stain N, the binarization signal D3 contains the noise signal N3 so that it is impossible to decode the information contained in the code image 51 correctly.
Next, the following will describe an example of the binarization processing by the code scanner when the code scanner and the object 50 to be read are away from each other by a distance more than a predetermined distance (a focal distance) and a light-receiving surface of the code scanner deviates from an image forming surface of a lens to an optical axis direction (defocus state). FIG. 16 is a diagram showing a waveform example of a read signal D4 in which a vertical axis indicates a signal level (intensity of the reflected light) and a horizontal axis indicates position.
This read signal D4 contains a wide bar waveform WB4 which has a downward large convex shape, a narrow bar waveform NB4 which has a downward small convex shape, a wide space waveform WS4 which has an upward large convex shape and a narrow space waveform NS4 which has an upward small convex shape, which respectively correspond to the wide bar WB, the narrow bar NB, the wide space WS and the narrow space NS in the code image 51, which is similar to the read signal D1 described on FIG. 13. Incidentally, in this example, even when the object 50 to be read is spotted with the stain N as shown in FIG. 12, the read signal D4 contains no noise N1 like the read signal D1, because the code scanner and the object 50 to be read are away from each other by a distance more than the focal distance.
FIG. 17 is a diagram showing a waveform example of a derivative signal D5 in which a vertical axis indicates a signal level and a horizontal axis indicates position. The code scanner differentiates the read signal D4 to produce the derivative signal D4. As shown in FIG. 17, this derivative signal D5 has a waveform in which inflection points of the wide bar waveform WB4, the narrow bar waveform NB4, the wide space waveform WS4 and the narrow space waveform NS4 in the read signal D4 are their extreme values. All the width lengths between the inflection points become almost the same length.
FIG. 18 is a diagram showing a waveform example of a binarization signal D6 in which a vertical axis indicates bar/space (the bar in a case of “0” and the space in a case of “1”) and a horizontal axis indicates position. The code scanner produces the binarization signal D6 by using the inflection points of the derivative signal D5 as standing points thereof or falling points thereof.
As shown in FIG. 18, this binarization signal D6 contains a wide bar signal WB6, a narrow bar signal NB6, a wide space signal WS6 and a narrow space signal NS6, which respectively correspond to the wide bar waveform WB4, the narrow bar waveform NB4, the wide space waveform WS4 and the narrow space waveform NS4.
Since all the width lengths between the inflection points are almost the same length as shown in FIG. 17, the wide bar signal WB6, the narrow bar signal NB6, the wide space signal WS6 and the narrow space signal NS6 all have almost the same length as each other. This disables the information contained in the code image 51 from being correctly decoded.